#ifndef HPLCAUTOSAMPLERBASICCONTROLPAGE_H
#define HPLCAUTOSAMPLERBASICCONTROLPAGE_H

#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QCloseEvent>

#include "moduleid.h"

class HplcAutoSamplerBasicControlPage : public QWidget
{
    Q_OBJECT
public:
    explicit HplcAutoSamplerBasicControlPage(ModuleID id, QWidget *parent = nullptr);
    virtual ~HplcAutoSamplerBasicControlPage() override;

    void setupUI();

public slots:
    void onParseCompleted(int id, const QVariant &var);

protected:
    virtual void closeEvent(QCloseEvent *event) override;

private:
    ModuleID m_moduleId;

    // analysisTime
    QLabel *m_lbAnalysisTime;
    QLabel *m_lbAnalysisTime_colon[2];
    QLineEdit *m_leAnalysisTime_hour;
    QLineEdit *m_leAnalysisTime_minute;
    QLineEdit *m_leAnalysisTime_second;
    QPushButton	*m_pbP_AnalysisTime;
    QPushButton	*m_pbSP_AnalysisTime;
    QPushButton	*m_pbSA_AnalysisTime;
    QHBoxLayout *hblAnalysisTime;

    // loopVolume
    QLabel *m_lbLoopVolume;
    QLineEdit *m_leLoopVolume;
    QPushButton	*m_pbP_LoopVolume;
    QPushButton	*m_pbSP_LoopVolume;
    QHBoxLayout *hblLoopVolume;

    // firstSamplePosition
    QLabel *m_lbFirstSamplePosition;
    QLineEdit *m_leFirstSamplePosition_PlateNumber;
    QLineEdit *m_leFirstSamplePosition_ColumnNumber;
    QLineEdit *m_leFirstSamplePosition_RowNumber;
    QPushButton	*m_pbP_FirstSamplePosition;
    QPushButton	*m_pbSP_FirstSamplePosition;
    QHBoxLayout *hblFirstSamplePosition;

    // lastSamplePosition
    QLabel *m_lbLastSamplePosition;
    QLineEdit *m_leLastSamplePosition_PlateNumber;
    QLineEdit *m_leLastSamplePosition_ColumnNumber;
    QLineEdit *m_leLastSamplePosition_RowNumber;
    QPushButton	*m_pbP_LastSamplePosition;
    QPushButton	*m_pbSP_LastSamplePosition;
    QHBoxLayout *hblLastSamplePosition;

    // flushVolume
    QLabel *m_lbFlushVolume;
    QLineEdit *m_leFlushVolume;
    QPushButton	*m_pbP_FlushVolume;
    QPushButton	*m_pbSP_FlushVolume;
    QPushButton	*m_pbSA_FlushVolume;
    QHBoxLayout *hblFlushVolume;

    // numberOfInjectionsOrSample
    QLabel *m_lbNumberOfInjectionOrSample;
    QLineEdit *m_leNumberOfInjectionOrSample;
    QPushButton	*m_pbP_NumberOfInjectionOrSample;
    QPushButton	*m_pbSP_NumberOfInjectionOrSample;
    QPushButton	*m_pbSA_NumberOfInjectionOrSample;
    QHBoxLayout *hblNumberOfInjectionOrSample;

    // syringeVolume
    QLabel *m_lbSyringeVolume;
    QLineEdit *m_leSyringeVolume;
    QPushButton	*m_pbP_SyringeVolume;
    QPushButton	*m_pbSP_SyringeVolume;
    QPushButton	*m_pbSA_SyringeVolume;
    QHBoxLayout *hblSyringeVolume;

    // tubingVolume
    QLabel *m_lbTubingVolume;
    QLineEdit *m_leTubingVolume;
    QPushButton	*m_pbP_TubingVolume;
    QPushButton	*m_pbSP_TubingVolume;
    QPushButton	*m_pbSA_TubingVolume;
    QHBoxLayout *hblTubingVolume;

    // firstTransportVial
    QLabel *m_lbFirstTransportVial;
    QLineEdit *m_leFirstTransportVial_PlateNumber;
    QLineEdit *m_leFirstTransportVial_ColumnNumber;
    QLineEdit *m_leFirstTransportVial_RowNumber;
    QPushButton	*m_pbP_FirstTransportVial;
    QPushButton	*m_pbSP_FirstTransportVial;
    QPushButton	*m_pbSA_FirstTransportVial;
    QHBoxLayout *hblFirstTransportVial;

    // lastTransportVial
    QLabel *m_lbLastTransportVial;
    QLineEdit *m_leLastTransportVial_PlateNumber;
    QLineEdit *m_leLastTransportVial_ColumnNumber;
    QLineEdit *m_leLastTransportVial_RowNumber;
    QPushButton	*m_pbP_LastTransportVial;
    QPushButton	*m_pbSP_LastTransportVial;
    QPushButton	*m_pbSA_LastTransportVial;
    QHBoxLayout *hblLastTransportVial;

    // sampleNeedleHeight
    QLabel *m_lbSampleNeedleHeight;
    QLineEdit *m_leSampleNeedleHeight;
    QPushButton	*m_pbP_SampleNeedleHeight;
    QPushButton	*m_pbSP_SampleNeedleHeight;
    QPushButton	*m_pbSA_SampleNeedleHeight;
    QHBoxLayout *hblSampleNeedleHeight;

    // syringeSpeed
    QLabel *m_lbSyringeSpeed;
    QLineEdit *m_leSyringeSpeed;
    QPushButton	*m_pbP_SyringeSpeed;
    QPushButton	*m_pbSP_SyringeSpeed;
    QPushButton	*m_pbSA_SyringeSpeed;
    QHBoxLayout *hblSyringeSpeed;

    // syringeSpeedScaleFactor
    QLabel *m_lbSyringeSpeedScaleFactor;
    QLineEdit *m_leSyringeSpeedScaleFactor;
    QPushButton	*m_pbP_SyringeSpeedScaleFactor;
    QPushButton	*m_pbSP_SyringeSpeedScaleFactor;
    QPushButton	*m_pbSA_SyringeSpeedScaleFactor;
    QHBoxLayout *hblSyringeSpeedScaleFactor;

    // bufferVolume
    QLabel *m_lbBufferVolume;
    QLineEdit *m_leBufferVolume;
    QPushButton	*m_pbP_BufferVolume;
    QPushButton	*m_pbSP_BufferVolume;
    QPushButton	*m_pbSA_BufferVolume;
    QHBoxLayout *hblBufferVolume;

    // actualSampleNumber
    QLabel *m_lbActualSampleNumber;
    QLineEdit *m_leActualSampleNumber_PlateNumber;
    QLineEdit *m_leActualSampleNumber_ColumnNumber;
    QLineEdit *m_leActualSampleNumber_RowNumber;
    QPushButton	*m_pbP_ActualSampleNumber;
    QPushButton	*m_pbSP_ActualSampleNumber;
    QPushButton	*m_pbSA_ActualSampleNumber;
    QHBoxLayout *hblActualSampleNumber;

    // status
    QLabel *m_lbStatus;
    QLineEdit *m_leIsError;
    QLineEdit *m_leStatus;
    QPushButton	*m_pbP_Status;
    QPushButton	*m_pbSP_Status;
    QPushButton	*m_pbSA_Status;
    QHBoxLayout *hblStatus;

    // errorCode
    QLabel *m_lbErrorCode;
    QLineEdit *m_leErrorCode;
    QPushButton	*m_pbP_ErrorCode;
    QPushButton	*m_pbSP_ErrorCode;
    QPushButton	*m_pbSA_ErrorCode;
    QHBoxLayout *hblErrorCode;

    // airSegment
    QLabel *m_lbAirSegment;
    QLineEdit *m_leAirSegment;
    QPushButton	*m_pbP_AirSegment;
    QPushButton	*m_pbSP_AirSegment;
    QPushButton	*m_pbSA_AirSegment;
    QHBoxLayout *hblAirSegment;

    // skipMissingSamplePosition
    QLabel *m_lbSkipMissingSamplePosition;
    QLineEdit *m_leSkipMissingSamplePosition;
    QPushButton	*m_pbP_SkipMissingSamplePosition;
    QPushButton	*m_pbSP_SkipMissingSamplePosition;
    QPushButton	*m_pbSA_SkipMissingSamplePosition;
    QHBoxLayout *hblSkipMissingSamplePosition;

    // headSpacePressure
    QLabel *m_lbHeadSpacePressure;
    QLineEdit *m_leHeadSpacePressure;
    QPushButton	*m_pbP_HeadSpacePressure;
    QPushButton	*m_pbSP_HeadSpacePressure;
    QPushButton	*m_pbSA_HeadSpacePressure;
    QHBoxLayout *hblHeadSpacePressure;

    // resetOutputAfterSerials
    QLabel *m_lbResetOutputAfterSerials;
    QLineEdit *m_leResetOutputAfterSerials;
    QPushButton	*m_pbP_ResetOutputAfterSerials;
    QPushButton	*m_pbSP_ResetOutputAfterSerials;
    QPushButton	*m_pbSA_ResetOutputAfterSerials;
    QHBoxLayout *hblResetOutputAfterSerials;

    // usePrepMode
    QLabel *m_lbUsePrepMode;
    QLineEdit *m_leUsePrepMode;
    QPushButton	*m_pbP_UsePrepMode;
    QPushButton	*m_pbSP_UsePrepMode;
    QPushButton	*m_pbSA_UsePrepMode;
    QHBoxLayout *hblUsePrepMode;

    // traySegmentSettings
    QLabel *m_lbTraySegmentSettings;
    QLineEdit *m_leTraySegmentSettings_LeftTrayType;
    QLineEdit *m_leTraySegmentSettings_RightTrayType;
    QLineEdit *m_leTraySegmentSettings_LeftType;
    QLineEdit *m_leTraySegmentSettings_RightType;
    QPushButton	*m_pbP_TraySegmentSettings;
    QPushButton	*m_pbSP_TraySegmentSettings;
    QPushButton	*m_pbSA_TraySegmentSettings;
    QHBoxLayout *hblTraySegmentSettings;

    // syncCondition
    QLabel *m_lbSyncCondition;
    QLineEdit *m_leSyncCondition_IsSyncWithValveWash;
    QLineEdit *m_leSyncCondition_IsSyncWithInject;
    QLineEdit *m_leSyncCondition_IsSyncWithLoad;
    QLineEdit *m_leSyncCondition_IsSyncWithNextInjection;
    QPushButton	*m_pbP_SyncCondition;
    QPushButton	*m_pbSP_SyncCondition;
    QPushButton	*m_pbSA_SyncCondition;
    QHBoxLayout *hblSyncCondition;

    // injectionVolume
    QLabel *m_lbInjectionVolume;
    QLineEdit *m_leInjectionVolume;
    QPushButton	*m_pbP_InjectionVolume;
    QPushButton	*m_pbSP_InjectionVolume;
    QPushButton	*m_pbSA_InjectionVolume;
    QHBoxLayout *hblInjectionVolume;

    // washBetween
    QLabel *m_lbWashBetween;
    QLineEdit *m_leWashBetween;
    QPushButton	*m_pbP_WashBetween;
    QPushButton	*m_pbSP_WashBetween;
    QPushButton	*m_pbSA_WashBetween;
    QHBoxLayout *hblWashBetween;

    // washTimes
    QLabel *m_lbWashTimes;
    QLineEdit *m_leWashTimes_Steps;
    QLineEdit *m_leWashTimes;
    QPushButton	*m_pbP_WashTimes;
    QPushButton	*m_pbSP_WashTimes;
    QPushButton	*m_pbSA_WashTimes;
    QHBoxLayout *hblWashTimes;

    // washSyringeValveSolventPort
    QLabel *m_lbWashSyringeValveSolventPort;
    QLineEdit *m_leWashSyringeValveSolventPort_Steps;
    QLineEdit *m_leWashSyringeValveSolventPort;
    QPushButton	*m_pbP_WashSyringeValveSolventPort;
    QPushButton	*m_pbSP_WashSyringeValveSolventPort;
    QPushButton	*m_pbSA_WashSyringeValveSolventPort;
    QHBoxLayout *hblWashSyringeValveSolventPort;

    // fillTransportPositionTimes
    QLabel *m_lbFillTransportPositionTimes;
    QLineEdit *m_leFillTransportPositionTimes_Port;
    QLineEdit *m_leFillTransportPositionTimes_Times;
    QPushButton	*m_pbP_FillTransportPositionTimes;
    QPushButton	*m_pbSP_FillTransportPositionTimes;
    QPushButton	*m_pbSA_FillTransportPositionTimes;
    QHBoxLayout *hblFillTransportPositionTimes;

    // washVolume
    QLabel *m_lbWashVolume;
    QLineEdit *m_leWashVolume_Steps;
    QLineEdit *m_leWashVolume;
    QPushButton	*m_pbP_WashVolume;
    QPushButton	*m_pbSP_WashVolume;
    QPushButton	*m_pbSA_WashVolume;
    QHBoxLayout *hblWashVolume;

    // useInMethod
    QLabel *m_lbUseInMethod;
    QLineEdit *m_leUseInMethod_IsUseTimedEvents;
    QLineEdit *m_leUseInMethod_IsUseMix;
    QPushButton	*m_pbP_UseInMethod;
    QPushButton	*m_pbSP_UseInMethod;
    QPushButton	*m_pbSA_UseInMethod;
    QHBoxLayout *hblUseInMethod;

    // serialNumber
    QLabel *m_lbSerialNumber;
    QLineEdit *m_leSerialNumber;
    QPushButton	*m_pbP_SerialNumber;
    QPushButton	*m_pbSP_SerialNumber;
    QPushButton	*m_pbSA_SerialNumber;
    QHBoxLayout *hblSerialNumber;

    // clearMixOrUserProg
    QLabel *m_lbClearMixOrUserProg;
    QLineEdit *m_leClearMixOrUserProg;
    QPushButton	*m_pbP_ClearMixOrUserProg;
    QPushButton	*m_pbSP_ClearMixOrUserProg;
    QPushButton	*m_pbSA_ClearMixOrUserProg;
    QHBoxLayout *hblClearMixOrUserProg;

    // clearMethod
    QLabel *m_lbClearMethod;
    QLineEdit *m_leClearMethod;
    QPushButton	*m_pbP_ClearMethod;
    QPushButton	*m_pbSP_ClearMethod;
    QPushButton	*m_pbSA_ClearMethod;
    QHBoxLayout *hblClearMethod;

    // startOrStop
    QLabel *m_lbStartOrStop;
    QLineEdit *m_leStartOrStop_StartUserProg;
    QLineEdit *m_leStartOrStop;
    QPushButton	*m_pbP_StartOrStop;
    QPushButton	*m_pbSP_StartOrStop;
    QPushButton	*m_pbSA_StartOrStop;
    QHBoxLayout *hblStartOrStop;

    // holdOrContinue
    QLabel *m_lbHoldOrContinue;
    QLineEdit *m_leHoldOrContinue;
    QPushButton	*m_pbP_HoldOrContinue;
    QPushButton	*m_pbSP_HoldOrContinue;
    QPushButton	*m_pbSA_HoldOrContinue;
    QHBoxLayout *hblHoldOrContinue;

    // searchSamplePosition
    QLabel *m_lbSearchSamplePosition;
    QLineEdit *m_leSearchSamplePosition_PlateNumber;
    QLineEdit *m_leSearchSamplePosition_PlatePosition;
    QPushButton	*m_pbP_SearchSamplePosition;
    QPushButton	*m_pbSP_SearchSamplePosition;
    QPushButton	*m_pbSA_SearchSamplePosition;
    QHBoxLayout *hblSearchSamplePosition;

    // initialWash
    QLabel *m_lbInitialWash;
    QLineEdit *m_leInitialWash_Port;
    QLineEdit *m_leInitialWash;
    QPushButton	*m_pbP_InitialWash;
    QPushButton	*m_pbSP_InitialWash;
    QPushButton	*m_pbSA_InitialWash;
    QHBoxLayout *hblInitialWash;

    // moveSyringe
    QLabel *m_lbMoveSyringe;
    QLineEdit *m_leMoveSyringe;
    QPushButton	*m_pbP_MoveSyringe;
    QPushButton	*m_pbSP_MoveSyringe;
    QPushButton	*m_pbSA_MoveSyringe;
    QHBoxLayout *hblMoveSyringe;

    // doorSensor
    QLabel *m_lbDoorSensor;
    QLineEdit *m_leDoorSensor;
    QPushButton	*m_pbP_DoorSensor;
    QPushButton	*m_pbSP_DoorSensor;
    QPushButton	*m_pbSA_DoorSensor;
    QHBoxLayout *hblDoorSensor;
};

#endif // HPLCAUTOSAMPLERBASICCONTROLPAGE_H
